package god.dream.comment.model;

import java.sql.Date;

public class Comment {
	private int id;
	private int uid;
	private Date date;
	private int value;
	private String commValue;

	public Comment() {
	}

	public Comment(int id, int uid, Date date, int value, String commValue) {
		this.id = id;
		this.uid = uid;
		this.date = date;
		this.value = value;
		this.commValue = commValue;
	}

	public Object[] insert() {
		return new Object[] { getId(), getUid(), getDatetoDate(),
				getValue(), getCommValue() };
	}

	public Object[] update() {
		return new Object[] { getUid(), getDatetoDate(), getValue(),
				getCommValue(), getId() };
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}
	public Date getDatetoDate() {
		return date;
	}
	public String getDate() {
		if(date != null)
			return date.toString();
		return null;
	}

	public void setDate(String date) {
		this.date = Date.valueOf(date);
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getCommValue() {
		return commValue;
	}

	public void setCommValue(String commValue) {
		this.commValue = commValue;
	}

}
